<template>
  <a-modal title="申样交付率" :width="660" :visible="visible" @ok="handleModalConfirm"
    @cancel="handleModalCancel" :confirm-loading="modalLoading" @after-open="saveFocusedElement" @after-close="restoreFocusedElement">
    <a-table :columns="columns" :data-source="dataList" :pagination="false">
      <a slot="name" slot-scope="text">{{ text }}</a>
    </a-table>
    
  </a-modal>
</template>

<script>
import * as Ajax from '@/api/channel';
import { mapState, mapGetters } from "vuex";
const columns = [
  {
    title: '申样总次数',
    dataIndex: 'samples_count',
    key: 'samples_count',
  },
  {
    title: '出单总次数',
    dataIndex: 'order_count',
    key: 'order_count',
  },
  {
    title: '最高出单量',
    key: 'max_send_count',
    dataIndex: 'max_send_count',
  },
  {
    title: '最高销售额',
    dataIndex: 'max_amount',
    key: 'max_amount',
  },
];

const data = [
  
];

export default {
  props: {
    task_uuid: {
      type: String,
      default: '',
    },
    visible: {
      type: Boolean,
      default: false,
    },
    dataList: {
      type: Array,
      default: [],
    },
  },
  data() {
    return {
      modalLoading: false,
   
      tipShow:false,
      customersListOptions: [],
      ks_user_id:'',
      nickname:'',
      data,
      columns,
    };
  },
  computed: {
    ...mapGetters("user", ["getCdnUrl", "getUserInfo"]),
  },
  methods: {
    processImage(imageUrl) {
      if (imageUrl === undefined || imageUrl === null) {
        return ""; // 或者返回一个默认的 URL
      }

      if (!imageUrl.startsWith("http")) {
        return this.getCdnUrl + imageUrl;
      }
      return imageUrl;
    },
    handleModalConfirm() {
      this.handleModalCancel()
    },
    
    handleModalCancel() {
      this.$emit('close');
    },
    saveFocusedElement() {
      this.focusedElement = document.activeElement;
    },
    restoreFocusedElement() {
      if (this.focusedElement) {
        this.focusedElement.focus();
      }
    },
    
   
  },
};
</script>

<style lang="scss" scoped>
.table-wrap {
  margin-top: 20px;
  padding-top: 16px;
}

.btn-gruop {
  display: flex;
  justify-content: flex-end;
}

::v-deep .ant-form-item {
  &:last-child {
    margin-bottom: 0;
  }
}
.tips_box {
  padding: 4px;
}
.text{
  // font-size: 16px;
  color: #999999;
  margin: 10px 0;
  // text-align: center;
  span {
    color: #E33B35;
  }
}
.sale {
  display: flex;
  align-items: center;
  margin-left: 4px;
  margin-bottom: 10px;
  div {
    font-size: 14px;
    span {
      color: #E33B35;
    }
  }
}
</style>